﻿using System;
using System.Collections.Generic;
using System.Text;

using Danser_Entity.Entities;

namespace Danser_Entity.Queries.Data
{
    /// <summary>
    /// Encapsulates test results according to determined parameters
    /// </summary>
    public class TestIntegratedData
    {
        #region C'Tors
        /// <summary>
        /// creates a TestIntegratedData instance with the given parameters
        /// </summary>
        /// <param name="tParams"></param>
        /// <param name="tResults"></param>
        public TestIntegratedData(TestParams tParams, TestResults tResults)
        {
            SetParams(tParams);
            SetResults(tResults);
        }
        #endregion

        #region Members:

        private TestParams _testParams;
        private TestResults _testResults;

        #endregion

        #region Getters/Setters:

        /// <summary>
        /// sets the TestIntegratedData instance params
        /// </summary>
        /// <param name="testParams"></param>
        public void SetParams(TestParams testParams)
        {
            _testParams = testParams;
        }

        /// <summary>
        /// returns the TestIntegratedData params
        /// </summary>
        /// <returns>
        /// TestParams
        /// </returns>
        public TestParams GetParams()
        {
            return _testParams;
        }

        /// <summary>
        /// sets the TestIntegratedData results
        /// </summary>
        /// <param name="testResults"></param>
        public void SetResults(TestResults testResults)
        {
            _testResults = testResults;
        }

        /// <summary>
        /// returns the TestIntegratedData results
        /// </summary>
        /// <returns>
        /// TestResults
        /// </returns>
        public TestResults GetResults()
        {
            return _testResults;
        }

        #endregion

        #region Properties:

        #region TestParams Properties:

        /// <summary>
        /// property
        /// </summary>
        public int TestParamsIndex
        {
            get { return _testParams.TestParamsIndex; }
        }

        /// <summary>
        /// property
        /// </summary>
        public String Channel
        {
            get { return _testParams.Channel; }
        }

        /// <summary>
        /// property
        /// </summary>
        public String ChannelWidth
        {
            get { return _testParams.ChannelWidth; }
        }

        /// <summary>
        /// property
        /// </summary>
        public String Band
        {
            get { return _testParams.Band; }
        }

        /// <summary>
        /// property
        /// </summary>
        public String TestInfoIndex
        {
            get { return _testParams.TestInfoIndex; }
        }

        #endregion

        #region TestResults Properties:

        /// <summary>
        /// property
        /// </summary>
        public int Attenuation
        {
            get { return _testResults.Attenuation; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RXMin
        {
            get { return _testResults.RXMin; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RXAvg
        {
            get { return _testResults.RXAvg; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RXMax
        {
            get { return _testResults.RXMax; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double TXMin
        {
            get { return _testResults.TXMin; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double TXAvg
        {
            get { return _testResults.TXAvg; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double TXMax
        {
            get { return _testResults.TXMax; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RSSI1
        {
            get { return _testResults.RSSI1; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RSSI2
        {
            get { return _testResults.RSSI2; }
        }

        /// <summary>
        /// property
        /// </summary>
        public double RSSI3
        {
            get { return _testResults.RSSI3; }
        }

        #endregion

        #endregion

    }
}
